<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台管理</title>
    <import type="css" file="admin/css/index" />
    <import type="js" file="common/jquery171min" />
    </head>
<body>
<div>
    <table style="width:480px; margin-left:20px;">
    <tr><td  height="35" colspan="2">商品名称：{$model2.goods_name}</td></tr>
      <tr><td height="35">评价人：{$model.member_id|show_member_name}</td><td>评价时间：{$model.create_time|stringtime=2}</td></tr>
        <tr><td  colspan="2">评价内容：{$model.detail|trim_textarea}</td></tr>
    </table>

<form name="frm" id="frm" action="" onSubmit="return false;" method="post">  
 <input type="hidden" value="{$model.id}" name="id" id="id"> 
   <table  class="fangxing_list">
  <tr><td width="100" height="40">审核状态</td><td><select name="status" id="status"><option value="1">未审核</option>
  <option value="2">审核通过</option>
  </select></td></tr>
  <tr><td>回复内容</td><td style="text-align:left;"><textarea name="reply_detail" id="reply_detail" cols="30">{$model.reply_detail}</textarea></td>
  <tr><td height="60" colspan="2"><span><button class="btn_a2" id="sumbit1">确认</button></span><span style="margin-left:20px;"><button class="btn_a3" id="btn3">关闭</button></span></td></tr>

</table>
</form>

</div>
<script src="__PUBLIC__/common/artDialog4.1.7/artDialog.source.js?skin=blue" type="text/javascript"></script>
<script src="__PUBLIC__/common/artDialog4.1.7/plugins/iframeTools.source.js" type="text/javascript"></script>
<script type="text/javascript">


  $(function(){
	$('#status').val('{$model.status}');
	
    $('#sumbit1').click(function(){
	
	 $("#sumbit1").attr("disabled", true)
      $.ajax({
        url: "{:U('GoodsComment/submit_reply')}",
        type: "POST",
        cache: false,
        data: $("#frm").serialize(),
        success: function (obj) {
        if (obj.title == 'success') {
			layer.msg('回复成功', {icon: 1});
		    $('.btn_a3').click();
		   //parent.window.location.reload();
		
		  /*
		   layer.msg(obj.msg, {
            time: 0 //不自动关闭
           ,btn: ['确定']
          ,yes: function(index){
       
            }
           });
			*/
		
            }
            else {
		    layer.msg(obj.msg, {icon: 5});
			$("#sumbit1").attr("disabled", false); 
            }
        },
    });
    })
	
	$('.btn_a3').click(function(){
	var api = art.dialog.open.api;
api && api.close() || window.close();
	}
	)
   
   })
</script>

</body>
</html>
